← Back to issue list

Two python3 parts using setuptools are always conflicting on core22

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2080356
Type
issue
State
open
Author
~gbeuzeboc
Labels
Created
2024-09-11 10:32:00.946177+00:00
Updated
2024-09-11 10:32:00.946177+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Two python3 parts using setuptools are always conflicting. This is due to the venv files as well as the __pycache__ files that are based on different paths. It seems basic to embed two projects in one snapcraft.yaml, but is not possible without having to play with the stage keyword. Starting from the basic example of the doc and adding a hello world found on GH gives: snapcraft.yaml: name: liquidctl base: core22 summary: a status and control utility to for power, cooling and LED components description: | ... adopt-info: liquidctl grade: stable confinement: strict apps: liquidctl: command: bin/liquidctl plugs: - raw-usb - uhid - hardware-observe parts: liquidctl: plugin: python source-type: git source: https://github.com/liquidctl/liquidctl override-pull: | snapcraftctl pull snapcraftctl set-version \ "$(git describe --long --tags --always --match=v*.*.* | sed 's/v//')" stage-packages: - python3-usb hello-world: plugin: python source-type: git source: https://github.com/buildbot/hello-world Building this snap fails due to "parts 'liquidctl' and 'hello-world' list the following files, but with different contents or permissions" regarding the following files: bin/activate bin/activate.fish bin/activate.csh A lot of the __pycache__/*.pyc files some .dist-info/RECORD files All of that is due to the fact that both parts have virtual environment located in different path. Only solution I could find is using stage: - -bin/activate* - -**/__pycache__/* - -**/RECORD Additionally, specifying a SNAPCRAFT_PYTHON_VENV_ARGS in one of the part will result in an additional conflict. Maybe such behaviour could be handled nicely by the python plugin.

Evaluation history

No evaluation history available.